<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<div class="span12 box-content">
	<div class="well"><h3>添加一个学生</h3>带<span style="color: red;" >*</span>为必填项目</div>
	<div class="span1"></div><div id="student_add_alert_container" class="span4"></div><br/>
	<form class="form-horizontal span11" id="student_add_form" >
		<div class="control-group">
			<label class="control-label">学号</label>
			<div class="controls">
				<input name="student_no"size="16" type="text" >
				<span class="help-inline" style="color: red;">*</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">姓名</label>
			<div class="controls">
				<input name="student_name"size="16" type="text"  >
				<span class="help-inline" style="color: red;">*</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">密码</label>
			<div class="controls">
				<input name="student_pass"size="16" type="text" >
				<span class="help-inline" style="color: red;">*</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">性别</label>
			<div class="controls">
				<select  name="gender">
					<option value="男" >男</option>
					<option value="女">女</option>
				</select>
				<span class="help-inline" style="color: red;">*</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">年级</label>
			<div class="controls">
				<input name="student_grade"size="16" type="text" >
				<span class="help-inline" style="color: red;">*</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">QQ</label>
			<div class="controls">
				<input name="student_qq"size="16" type="text">
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">电话</label>
			<div class="controls">
				<input name="student_tel"size="16" type="text">
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">所属学院</label>
			<div class="controls">
				<c:if test="${user.superAdmin }">
					<select  name="college" >
						<c:forEach items="${colleges }" var="c" >
							<option value="${c.id }">${c.name }</option>
						</c:forEach>
					</select>
				</c:if>
				<c:if test="${!user.superAdmin }">
					<select  name="college" disabled>
						<c:forEach items="${colleges }" var="c" >
							<option value="${c.id }" ${c.id==user.collegeId?"selected":"" }>${c.name }</option>
						</c:forEach>
					</select>
				</c:if>
				<span class="help-inline" style="color: red;">*</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">所属系</label>
			<div class="controls">
				<select  name="department">
					<c:forEach items="${departments }" var="d" >
						<option value="${d.id }">${d.name }</option>
					</c:forEach>
					<c:if test="${fn:length(departments)==0}">
						<option value="0">无数据</option>
					</c:if>
				</select>
				<span class="help-inline" style="color: red;">*</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">所属班级</label>
			<div class="controls">
				<select  name="classInfo">
					<c:forEach items="${classList }" var="c" >
						<option value="${c.id }">${c.name }</option>
					</c:forEach>
					<c:if test="${fn:length(classList)==0}">
						<option value="0">无数据</option>
					</c:if>
				</select>
				<span class="help-inline" style="color: red;">*</span>
			</div>
		</div>
		<div class="form-actions">
			<button type="button" class="btn" onclick="history.go(-1)">取消并返回</button>
			<button type="button" class="btn btn-primary"id="student_add_form_save">保存并返回</button>
		</div>
	</form>
</div>
<!-- 重置密码开始 -->